<template>
	<view class="">
		
		<view class="box_one">
			<view class="box_tt"><text>实际收益</text><text>¥{{order_info.price*order_info.techn_last.divide_into/100 + order_info.techn_car -order_info.qudao}}</text></view>
			<view class="box_wz"><text>{{order_info.add_time_time}}</text>	</view>
			<view class="box_wz"><text>订单号:{{order_info.order_no}}</text></view>
		</view>
		<view class="box_one">
			<view class="box_tt"><text>项目明细</text><text></text></view>
			<view class="box_lia"><text>服务时间</text><text>{{order_info.service_time}}</text></view>
			<view class="box_lia"><text>{{order_info.detail.title}}</text><text>¥{{order_info.detail.price}}</text></view>
			<view v-for="(item,inde) in order_info.jiaz">
				<view class="box_lia"><text>{{item.title}}</text><text>¥{{item.price}}</text></view>
			</view>
			<view class="box_lia"><text>优惠券金额</text><text>-¥{{order_info.increase_price}}</text></view>
			<view class="box_lia"><text>项目金额</text><text>{{order_info.price}}</text></view>
			<view class="box_lia"><text>提成比例</text><text>{{order_info.techn_last.divide_into}}</text></view>
			<view class="xian"></view>
			<view class="box_lia"><text>应得收益</text><text>{{order_info.price*order_info.techn_last.divide_into/100}}</text></view>
		</view>
		
		<view class="box_one">
			<view class="box_tt"><text>扣费明细</text><text></text></view>
			<view class="box_lia"><text>渠道扣费</text><text>¥{{order_info.qudao}}</text></view>
			
			<view class="xian"></view>
			<view class="box_lia"><text>合计扣费</text><text>-¥{{order_info.qudao}}</text></view>
		</view>
		
		<view class="box_one">
			<view class="box_tt"><text>车费明细</text><text></text></view>
			<view class="box_lia"><text>车费收益</text><text>¥{{order_info.techn_car}}</text></view>
			
			<view class="xian"></view>
			<view class="box_lia"><text>车费收益</text><text>¥{{order_info.techn_car}}</text></view>
		</view>
	
	</view>
	
</template>

<script>
	const app = getApp();
	const request = require('../../utils/request');
	export default {
		data() {
			return {
				order_id:0,
				order_info:{},
			}
		},
		onLoad(options)
		{
			this.order_id = options.order_id;
			this.get_info();
		},
		onShow()
		{
			
		},
		
		methods: {
			get_info:function()
			{
				var that = this;
				//网络请求
				request(app.globalData.api_url+'/v1/money/detail', 'POST', {order_id:this.order_id}).then((res) => {
					if(res.data.code == 0)
					{
						that.order_info = res.data.data;
					}
				});
			},
			/**
			 * 获取技师余额日志列表
			 */
			load_money_log:function(is_push = false)
			{
				var that = this;
				var params = that.params;
				params.type = that.ctany;
				//网络请求
				request(app.globalData.api_url+'/v1/money/log_lists', 'POST', params).then((res) => {
					uni.stopPullDownRefresh();
					if(res.data.code == 0)
					{
						let money_log_list = that.money_log_list;
						if(is_push == true)
						{
							//追加
							money_log_list = money_log_list.concat(res.data.data);
						}else
						{
							//更改
							money_log_list = res.data.data;
						}
						that.money_log_list = money_log_list;
						that.params.page += 1;
						that.push_status = true;
					}else
					{
						uni.showToast({
							title:res.data.msg,
							icon:'none'
						});
						app.is_login_check(res.data);
						app.is_techn_check(res.data);
						that.push_status = false;
					}
				});
			},
			money_detail:function(order_id){
				var that = this;
				console.log(order_id);
				uni.navigateTo({
				            url: '/pages/order/orderdetail?order_id='+order_id
				        })
				// request(app.globalData.api_url+'/v1/money/money_detail', 'POST', order_id).then((res) => {
					
				// 	if(res.data.code == 0)
				// 	{
						
				// 	}
				// });
			}
		}
	}
</script>

<style lang="scss">
page{
	background-color: $uni-bg-color-grey;
}
.box_one{
	width: 96%;
	margin: 0 auto;
	background-color: white;
	border-radius: 30rpx;
	width:100%;
	padding:10rpx;
	margin-top: 16rpx;
	
	.box_tt{
		font-size: 35rpx;
		font-weight: bold;
		
		text{
			display: inline-block;
			line-height: 30rpx;
			width: 40%;
			padding:16rpx 20rpx;
		&:last-child{
			text-align: right;
		}
	}
		
		
	}
	.box_wz{
		font-size: 26rpx;
		color:#999;
		padding:12rpx 20rpx;
		
	}
	.box_lia{
		font-size: 26rpx;
		color:#999;
		padding:12rpx 20rpx;
		width:100%;
		text{
			display: inline-block;
			width:32%;
		}
		text:last-child{
			width:58%;
			text-align: right;
		}
	}
	.xian{
		width:86%;
		margin: 10rpx auto;
		height: 2rpx;
		// border-top: 1rpx solid #999;
		background-color: #ccc;
		display: block;
	}
	
	}
</style>